equating coefficients